package com.xuelang.pipeline.worker.client.common.exception;

/**
 * @author xiwen.zxg
 * @since 2024/12/3
 */
public interface ExceptionConstant {

    /**
     * HTTP 401 未认证错误页面
     */
    String HTTP_ERROR_401 = "<!DOCTYPE html>\n" +
            "<html lang=\"en\">\n" +
            " <head>\n" +
            "  <meta charset=\"UTF-8\">\n" +
            "  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" +
            "  <title>401未认证</title>\n" +
            " </head>\n" +
            " <body>\n" +
            "  <div style='display:block;padding:60px;text-align:center;vertical-align:middle;'>\n" +
            "  \t<span><h2>401</h2></span>\n" +
            "\t<span><h4>未认证用户</h4></span>\n" +
            "\t<span><hr></span>\n" +
            "\t<span><h6>很抱歉，您的登录未通过认证，若有疑问请联系管理员.</h6></span>\n" +
            "  </div>\n" +
            " </body>\n" +
            "</html>";

    /**
     * HTTP 403 无权限错误页面
     */
    String HTTP_ERROR_403 = "<!DOCTYPE html>\n" +
            "<html lang=\"en\">\n" +
            " <head>\n" +
            "  <meta charset=\"UTF-8\">\n" +
            "  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" +
            "  <title>403未授权</title>\n" +
            " </head>\n" +
            " <body>\n" +
            "  <div style='display:block;padding:60px;text-align:center;vertical-align:middle;'>\n" +
            "  \t<span><h2>403</h2></span>\n" +
            "\t<span><h4>模块没有授权</h4></span>\n" +
            "\t<span><hr></span>\n" +
            "\t<span><h6>很抱歉，您没有权限访问此页面，若有疑问请联系管理员.</h6></span>\n" +
            "  </div>\n" +
            " </body>\n" +
            "</html>\n";

    /**
     * HTTP 401 用户信息未发现
     */
    String HTTP_ERROR_USER_401 = "<!DOCTYPE html>\n" +
            "<html lang=\"en\">\n" +
            " <head>\n" +
            "  <meta charset=\"UTF-8\">\n" +
            "  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" +
            "  <title>401用户信息未发现</title>\n" +
            " </head>\n" +
            " <body>\n" +
            "  <div style='display:block;padding:60px;text-align:center;vertical-align:middle;'>\n" +
            "  \t<span><h2>401</h2></span>\n" +
            "\t<span><h4>用户信息未发现</h4></span>\n" +
            "\t<span><hr></span>\n" +
            "\t<span><h6>很抱歉，您的登录账号未发现，若有疑问请联系管理员.</h6></span>\n" +
            "  </div>\n" +
            " </body>\n" +
            "</html>";


    /**
     * 数据库操作异常
     */
    String DB_ERROR = "数据库操作异常,请查看服务日志.";

    /**
     * 请求参数格式错误
     */
    String REQUEST_PARAM_FORMAT_ERROR = "请求参数格式错误";

    /**
     * 不支持的请求方法
     */
    String NOT_SUPPORT_REQUEST_METHOD = "不支持当前请求方法";

    /**
     * 不支持的媒体类型
     */
    String NOT_SUPPORT_MEDIA_TYPE = "不支持当前媒体类型";

    /**
     * 服务器发生异常
     */
    String INTERNAL_SERVER_ERROR = "服务器发生异常，请联系管理员";

    /**
     * HTTP 402 用户未分配系统资源
     */
    String HTTP_ERROR_USER_204 = "<!DOCTYPE html>\n" +
            "<html lang=\"en\">\n" +
            " <head>\n" +
            "  <meta charset=\"UTF-8\">\n" +
            "  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" +
            "  <title>402未分配系统资源</title>\n" +
            " </head>\n" +
            " <body>\n" +
            "  <div style='display:block;padding:60px;text-align:center;vertical-align:middle;'>\n" +
            "  \t<span><h2>401</h2></span>\n" +
            "\t<span><h4>用户未分配系统资源</h4></span>\n" +
            "\t<span><hr></span>\n" +
            "\t<span><h6>很抱歉，您登录的账号未发现任何系统资源，若有疑问请联系管理员.</h6></span>\n" +
            "  </div>\n" +
            " </body>\n" +
            "</html>";


    /**
     * 友好的403提示
     */
    String HTTP_ERROR_FRIENDLY_403 = "<!DOCTYPE html>\n" +
            "<html lang=\"zh\">\n" +
            "<head>\n" +
            "    <meta charset=\"UTF-8\">\n" +
            "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" +
            "    <title>403 访问受限</title>\n" +
            "    <style>\n" +
            "        body {\n" +
            "            font-family: \"Microsoft YaHei\", Arial, sans-serif;\n" +
            "            background: linear-gradient(135deg, #f6f8fb 0%, #e9ecef 100%);\n" +
            "            display: flex;\n" +
            "            justify-content: center;\n" +
            "            align-items: center;\n" +
            "            height: 100vh;\n" +
            "            margin: 0;\n" +
            "            overflow: hidden;\n" +
            "            position: relative;\n" +
            "        }\n" +
            "\n" +
            "        /* 添加背景动态效果 */\n" +
            "        body::before {\n" +
            "            content: '';\n" +
            "            position: absolute;\n" +
            "            width: 200%;\n" +
            "            height: 200%;\n" +
            "            background: radial-gradient(circle, transparent 20%, #f6f8fb 20%, #f6f8fb 80%, transparent 80%, transparent),\n" +
            "                        radial-gradient(circle, transparent 20%, #f6f8fb 20%, #f6f8fb 80%, transparent 80%, transparent) 50px 50px;\n" +
            "            background-size: 100px 100px;\n" +
            "            animation: backgroundMove 8s linear infinite;\n" +
            "            opacity: 0.5;\n" +
            "        }\n" +
            "\n" +
            "        .container {\n" +
            "            text-align: center;\n" +
            "            padding: 70px;\n" +
            "            background: rgba(255, 255, 255, 0.95);\n" +
            "            border-radius: 30px;\n" +
            "            box-shadow: \n" +
            "                0 20px 60px rgba(0, 0, 0, 0.1),\n" +
            "                0 1px 8px rgba(0, 0, 0, 0.05),\n" +
            "                inset 0 0 0 1px rgba(255, 255, 255, 0.4);\n" +
            "            max-width: 600px;\n" +
            "            width: 90%;\n" +
            "            animation: fadeIn 0.8s ease-in-out;\n" +
            "            backdrop-filter: blur(20px);\n" +
            "            border: 1px solid rgba(255, 255, 255, 0.2);\n" +
            "            position: relative;\n" +
            "            z-index: 1;\n" +
            "        }\n" +
            "\n" +
            "        .error-code {\n" +
            "            position: relative;\n" +
            "            display: inline-block;\n" +
            "            margin: 20px 0;\n" +
            "        }\n" +
            "\n" +
            "        h1 {\n" +
            "            font-size: 120px;\n" +
            "            margin: 0;\n" +
            "            font-weight: 900;\n" +
            "            background: linear-gradient(45deg, #ff6b6b, #ff8787, #ffa8a8);\n" +
            "            -webkit-background-clip: text;\n" +
            "            -webkit-text-fill-color: transparent;\n" +
            "            animation: colorFlow 8s ease infinite;\n" +
            "            letter-spacing: 8px;\n" +
            "            position: relative;\n" +
            "            display: inline-block;\n" +
            "        }\n" +
            "\n" +
            "        h1::before {\n" +
            "            content: '403';\n" +
            "            position: absolute;\n" +
            "            left: 0;\n" +
            "            top: 0;\n" +
            "            z-index: -1;\n" +
            "            background: linear-gradient(45deg, #ff6b6b, #ff8787, #ffa8a8);\n" +
            "            -webkit-background-clip: text;\n" +
            "            -webkit-text-fill-color: transparent;\n" +
            "            opacity: 0.5;\n" +
            "            filter: blur(20px);\n" +
            "            transform: scale(1.2);\n" +
            "            animation: glowPulse 2s ease-in-out infinite alternate;\n" +
            "        }\n" +
            "\n" +
            "        h2 {\n" +
            "            color: #2c3e50;\n" +
            "            margin: 30px 0;\n" +
            "            font-size: 36px;\n" +
            "            font-weight: 700;\n" +
            "            letter-spacing: 3px;\n" +
            "            background: linear-gradient(45deg, #2c3e50, #3b4d61);\n" +
            "            -webkit-background-clip: text;\n" +
            "            -webkit-text-fill-color: transparent;\n" +
            "            animation: slideIn 0.6s ease-out;\n" +
            "        }\n" +
            "\n" +
            "        p {\n" +
            "            color: #34495e;\n" +
            "            margin: 20px 0;\n" +
            "            line-height: 2;\n" +
            "            font-size: 16px;\n" +
            "            opacity: 0;\n" +
            "            animation: fadeInUp 0.8s ease-out forwards;\n" +
            "            padding: 0 30px;\n" +
            "            letter-spacing: 0.5px;\n" +
            "        }\n" +
            "\n" +
            "        .icon {\n" +
            "            font-size: 90px;\n" +
            "            margin-bottom: 30px;\n" +
            "            animation: bounce 2s infinite;\n" +
            "            filter: drop-shadow(0 8px 16px rgba(255, 107, 107, 0.4));\n" +
            "            transform-origin: center;\n" +
            "            display: inline-block;\n" +
            "        }\n" +
            "\n" +
            "        /* 新增装饰元素 */\n" +
            "        .decoration {\n" +
            "            position: absolute;\n" +
            "            width: 100%;\n" +
            "            height: 100%;\n" +
            "            top: 0;\n" +
            "            left: 0;\n" +
            "            overflow: hidden;\n" +
            "            border-radius: 30px;\n" +
            "            z-index: -1;\n" +
            "        }\n" +
            "\n" +
            "        .decoration::before,\n" +
            "        .decoration::after {\n" +
            "            content: '';\n" +
            "            position: absolute;\n" +
            "            width: 200px;\n" +
            "            height: 200px;\n" +
            "            background: linear-gradient(45deg, #ff6b6b22, #ff878722);\n" +
            "            border-radius: 50%;\n" +
            "            animation: float 6s infinite alternate;\n" +
            "        }\n" +
            "\n" +
            "        .decoration::before {\n" +
            "            top: -100px;\n" +
            "            left: -100px;\n" +
            "        }\n" +
            "\n" +
            "        .decoration::after {\n" +
            "            bottom: -100px;\n" +
            "            right: -100px;\n" +
            "            animation-delay: -3s;\n" +
            "        }\n" +
            "\n" +
            "        @keyframes colorFlow {\n" +
            "            0% { filter: hue-rotate(0deg); }\n" +
            "            100% { filter: hue-rotate(360deg); }\n" +
            "        }\n" +
            "\n" +
            "        @keyframes glowPulse {\n" +
            "            0% { opacity: 0.3; transform: scale(1.2); }\n" +
            "            100% { opacity: 0.6; transform: scale(1.3); }\n" +
            "        }\n" +
            "\n" +
            "        @keyframes float {\n" +
            "            0% { transform: translate(0, 0) rotate(0deg); }\n" +
            "            100% { transform: translate(20px, 20px) rotate(90deg); }\n" +
            "        }\n" +
            "\n" +
            "        @keyframes backgroundMove {\n" +
            "            0% { transform: translate(0, 0); }\n" +
            "            100% { transform: translate(-100px, -100px); }\n" +
            "        }\n" +
            "\n" +
            "        @keyframes bounce {\n" +
            "            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }\n" +
            "            40% { transform: translateY(-20px); }\n" +
            "            60% { transform: translateY(-10px); }\n" +
            "        }\n" +
            "\n" +
            "        @keyframes fadeIn {\n" +
            "            from { \n" +
            "                opacity: 0; \n" +
            "                transform: translateY(-30px); \n" +
            "                filter: blur(10px);\n" +
            "            }\n" +
            "            to { \n" +
            "                opacity: 1; \n" +
            "                transform: translateY(0);\n" +
            "                filter: blur(0);\n" +
            "            }\n" +
            "        }\n" +
            "\n" +
            "        @keyframes fadeInUp {\n" +
            "            from { \n" +
            "                opacity: 0;\n" +
            "                transform: translateY(30px);\n" +
            "                filter: blur(5px);\n" +
            "            }\n" +
            "            to {\n" +
            "                opacity: 1;\n" +
            "                transform: translateY(0);\n" +
            "                filter: blur(0);\n" +
            "            }\n" +
            "        }\n" +
            "\n" +
            "        p:nth-child(1) { animation-delay: 0.4s; }\n" +
            "        p:nth-child(2) { animation-delay: 0.7s; }\n" +
            "\n" +
            "        .container:hover {\n" +
            "            transform: translateY(-5px) scale(1.01);\n" +
            "            transition: all 0.3s ease;\n" +
            "            box-shadow: \n" +
            "                0 25px 65px rgba(0, 0, 0, 0.12),\n" +
            "                0 8px 25px rgba(0, 0, 0, 0.08),\n" +
            "                inset 0 0 0 1px rgba(255, 255, 255, 0.6);\n" +
            "        }\n" +
            "\n" +
            "        .container:hover .icon {\n" +
            "            animation: shake 0.5s ease-in-out;\n" +
            "        }\n" +
            "\n" +
            "        @keyframes shake {\n" +
            "            0%, 100% { transform: rotate(0deg); }\n" +
            "            25% { transform: rotate(-10deg); }\n" +
            "            75% { transform: rotate(10deg); }\n" +
            "        }\n" +
            "    </style>\n" +
            "</head>\n" +
            "<body>\n" +
            "    <div class=\"container\">\n" +
            "        <div class=\"decoration\"></div>\n" +
            "        <div class=\"icon\">⚠\uFE0F</div>\n" +
            "        <div class=\"error-code\">\n" +
            "            <h1>403</h1>\n" +
            "        </div>\n" +
            "        <h2>访问受限</h2>\n" +
            "        <p>您已获得授权，但由于同步自门户的项目或项目成员数据同步不正常，导致您未能正常使用系统功能。</p>\n" +
            "        <p>请联系系统管理员，检查账号的项目及项目成员数据状态，来获得访问帮助，非常感谢您的理解及支持。</p>\n" +
            "    </div>\n" +
            "</body>\n" +
            "</html>";
}
